<template>
	<view class="components-home">
		<view style="font-size: 40rpx;font-weight: bold;text-align: center;">
			支付成功 {{order_money}} 猫币
		</view>
		<view style="display: flex;margin: 60rpx 0;flex-direction: row;justify-content: center;align-items: center;">
			<view style="width: 50rpx;height: 50rpx;">
				<image src="@/static/mao/jifen.png" style="width: 100%;" mode="widthFix"></image>
			</view>
			<view style="display: flex;flex-direction: column;justify-content: center;align-items: flex-start;margin-left: 30rpx;
			font-size: 26rpx;
			">
				<text style="font-weight: bold;">
					本次消费获得 {{order_money}} 积分
				</text>
				<text style="color: #bebebe;">
					于60天后清零，请及时兑换
				</text>
			</view>
			
			<view style="background: #bebebe;position: fixed; bottom: 100rpx;width: 80%;
				height: 100rpx;font-size: 40rpx;font-weight: bold;border-radius: 30rpx;
				text-align: center;line-height: 100rpx;
			"
			@click="toOrder"
			>
				完成
			</view>
		</view>
	</view>
</template>

<script>
	import request from '@/common/request.js';
	export default {
		
		data() {
			return {
				order_id:"",
				order_money:0
			}
		},
		
		onLoad(option) {
			this.order_id = option.id;
			this.init();
		},
		methods: {
			init(){
				let opt = {
					url : 'api/gashapons/orderDetail',
					method: 'get'
				};
				
				request.httpTokenRequest(opt,{order_id:this.order_id}).then((res)=>{
					this.order_money = res.data.data.order_money
				})
			},
			toOrder(){
				uni.navigateTo({
					url:"/pages/me/order"
				})
				return ;
			}
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background: #f2f2f2;
	}
	.components-home{
		padding: 30rpx;
	}
</style>
